Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

many: switch to bootc install to-filesystem (HMS-3453) #462

Merged
merged 6 commits into from
Mar 26, 2024

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented Feb 22, 2024

There are some more customizations that I would love to see considered:

  1. kernel commandline append
  2. non-system users (but I know it's a hard problem)

It also requires changes in bib, those are tracked in osbuild/bootc-image-builder#304 and we need to merge the two in tandem to keep things buildable.

@mvo5 mvo5 marked this pull request as ready for review February 28, 2024 17:29
@mvo5 mvo5 force-pushed the use-bootc-install-to-fs branch from 0b0ea6c to e052adf Compare February 28, 2024 17:29
@cgwalters
Copy link
Contributor

but we also do AWS testing and for that this approach will not work :/ so it looks like some sort of (2) is actually needed

For reference on this; yes, injecting a static key via bib is a baseline mechanism that works across platforms.

However, it's not the only approach. There's also injecting the key via a derived container build, and there is also adding cloud-init.

I do think the docs and CI for this project is overly focused on trying to exactly use the base images instead of generating derived ones - this was touched on in osbuild/bootc-image-builder#135

Anyways though...this is all still orthogonal, right? We can still inject user configuration on top of bootc install to-filesystem without requiring changes to either this project or bootc right now.

pkg/manifest/build.go Outdated Show resolved Hide resolved
@mvo5 mvo5 force-pushed the use-bootc-install-to-fs branch from 0831da3 to ee150f4 Compare March 19, 2024 10:58
@mvo5 mvo5 requested a review from ondrejbudai March 20, 2024 16:46
@mvo5
Copy link
Contributor Author

mvo5 commented Mar 20, 2024

I think this is ready for a first review from someone experienced with images like ondrej or achilleas now.

@mvo5 mvo5 force-pushed the use-bootc-install-to-fs branch from c4ab640 to 592b14d Compare March 21, 2024 16:46
@mvo5 mvo5 requested a review from achilleas-k March 21, 2024 16:48
@mvo5 mvo5 changed the title many: switch to bootc install to-filesystem many: switch to bootc install to-filesystem (HMS-3453) Mar 22, 2024
ondrejbudai
ondrejbudai previously approved these changes Mar 26, 2024
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! :)

pkg/image/bootc_disk.go Outdated Show resolved Hide resolved
pkg/image/bootc_disk.go Outdated Show resolved Hide resolved
pkg/manifest/raw_bootc.go Outdated Show resolved Hide resolved
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general. Other than Colin's comments, this also needs a newer osbuild version for the selinux stage changes.
Manifest validation currently failing with

{"type": "https://osbuild.org/validation-error", "title": "JSON Schema validation failed", "success": false, "errors": [{"message": "Additional properties are not allowed ('exclude_paths' was unexpected)", "path": ["pipelines", 0, "stages", 1, "options"]}]}

mvo5 added 6 commits March 26, 2024 14:39
osbuild.ContainersInput->osbuild.ContainerDeployInputs
The osbuild stage will fail if we pass `None` here.
This image type is distinct from the RawOSTreeImage because the
way `bootc instal to-filesystem` works is quite different from
how our existing ostree deployments work.
This enusre that the buildroot container is setup without selinux
warnings.
This adds support for being able to add user customization. In
practise we can only handle adding root user key(s) for now until
we have more discussion about how to support adding users in a
bootc supported way.

This support for keys is essential to allow testing the images
without play gustfish or similar tricks (which is hard on a
bootc deploy because bootc will bind mount the deploy `etc`
over the `sysroot/etc` on first boot so anything we do on the
root of the disk will not work for /etc (/root/.authorized_keys
might work actually maybe?).

This also adds support for kernel-args to the bootc install-to-fs
stage.
This commit adds support to include KernelOptionsAppend to a
BootcDiskImage. This is important for cloud support.
@achilleas-k achilleas-k enabled auto-merge March 26, 2024 15:45
@achilleas-k achilleas-k added this pull request to the merge queue Mar 26, 2024
Merged via the queue into osbuild:main with commit 58ef1ae Mar 26, 2024
14 of 16 checks passed
@mvo5 mvo5 deleted the use-bootc-install-to-fs branch April 18, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants